<!DOCTYPE html>

<html lang="zh-CN">
	<head>
		<meta charset="utf-8" />
		<meta name="renderer" content="webkit" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<title>会员列表</title>
		<script src="/static/js/jquery-1.9.1.min.js"></script>
        <script src="/static/bootstrap.modal/bootstrap.js"></script>
        <script src="/static/js/base.js"></script>
        <script src="/static/js/avalon.js"></script>
        <script src="/static/js/eqx.js"></script>
        <script src="/static/js/goods/jquery.colorbox-min.js"></script>
        <script src="/static/js/goods/zzsc.js"></script>
		
		
        <link media="all" href="/static/bootstrap.modal/bootstrap.min.css" rel="stylesheet">
        <link media="all" href="/static/css/main.css" rel="stylesheet">
        <link media="all" href="/static/css/base.hy.css" rel="stylesheet">
        <link media="all" href="/static/css/goods.css" rel="stylesheet">
		
		<style type="text/css">
			  .list-content img{margin-right: 8px}
	.check{cursor:pointer}
	table{width: :100%;}
		</style>

		
	</head>
<body>

<div class="box" ms-controller="table">
    <a href="javascript:;" ms-click="login()">登录</a>
  <input type="text" ms-duplex="data.nickname">
  <a href="javascript:;" ms-click="setNickname()">修改</a>
<a href="javascript:;" ms-click="center()">主页</a>
<a href="javascript:;" ms-click="saveGoods()">新增商品</a>
<a href="javascript:;" ms-click="updateGoods()">修改商品</a>
<a href="javascript:;" ms-click="addGoodsType()">新增商品类型</a>
<a href="javascript:;" ms-click="editGoodsType()">修改商品类型</a>
<a href="javascript:;" ms-click="addGoodsTypeSeo()">新增商品类型SEO</a>
<a href="javascript:;" ms-click="editGoodsTypeSeo()">修改商品类型SEO</a><br >
<a href="javascript:;" ms-click="addGoodsSeo()">新增商品SEO</a>
</div>
<script type="text/javascript"> 
	var vm = avalon.define({
		$id : "table",
    data:{nickname:''},
    getList: function(){
			$.post('/user/register',{phone:13622293045,password:"46asd",againPassword:"46asd"}, function(json) {
  			
		  },'json');
		},
    login: function(){
			$.post('/user/login',{phone:13622293045,password:"46asd"}, function(json) {
  			vm.center()
		  },'json');
		},
    center: function(){
			$.post('/user/center',{}, function(json) {
  			
		  },'json');
		},
    setNickname:function(){
      $.post('/user/setNickname',{nickname:vm.data.nickname}, function(json) {
  			
		  },'json');
    },
    saveGoods:function(){
      $.post('/goods/add',{goods_type_id:1,goods_name:"asd",goods_introduction:"asd",goods_state:1,goods_stock:123,get_integral:123,pay_type:1,buy_limit:12,sort:132,is_hot:1,goods_format:'[{"filter_id":"2,3,4","goods_numbers":"qe123123","goods_price":20.00,"goods_stock":13,"goods_weight":23.14},{"filter_id":"2,3,4","goods_numbers":"aaaae13","goods_price":20.00,"goods_stock":13,"goods_weight":23.14}]'}, function(json) {
  			
		  },'json');
    },
    updateGoods:function(){
      $.post('/goods/update',{goods_id:4,goods_type_id:1,goods_name:"111a1111",goods_introduction:"as2323d",goods_state:1,goods_stock:123,get_integral:123,pay_type:1,buy_limit:12,sort:132,is_hot:1,goods_format:'[{"id":9,"filter_id":"2","goods_numbers":"111a","goods_price":30.00,"goods_stock":123123,"goods_weight":23.14},{"id":10,"filter_id":"2,3,4","goods_numbers":"aaaae13","goods_price":20.00,"goods_stock":13,"goods_weight":23.14}]'}, function(json) {
  			
		  },'json');
    },
    addGoodsType:function(){
      $.post('/goods/addType',{parent_id:1,type_name:'联想电脑',is_top:0,goods_brand_ids:'4,6'}, function(json) {
  			
		  },'json');
    },
    editGoodsType:function(){
      $.post('/goods/updateType',{id:1,parent_id:1,type_name:'联想电脑',is_top:0,goods_brand_ids:'4'}, function(json) {
  			
		  },'json');
    },
    addGoodsTypeSeo:function(){
      $.post('/goods/addTypeSeo',{type_id:1,title:'电脑',keyword:'电脑',description:'计算机'}, function(json) {
  			
		  },'json');
    },
    editGoodsTypeSeo:function(){
      $.post('/goods/updateTypeSeo',{id:1,type_id:1,title:'电脑,笔记本电脑',keyword:'电脑，手提',description:'计算机'}, function(json) {
  			
		  },'json');
    },
    goodsTypeList:function(){
      $.post('/goods/typeList',{pagenum:20,page:1,parent_id:1}, function(json) {
  			
		  },'json');
    },

    goodsList:function(){
      $.post('/goods/List',{pagenum:20,page:1,search:""}, function(json) {
  			
		  },'json');
    },

    addGoodsSeo:function(){
      $.post('/goods/addSeo',{goods_id:4,another_name:"电脑不错",keyword:"电脑",description:"电脑"}, function(json) {
  			
		  },'json');
    }
	});
//vm.goodsTypeList()
</script>
</body>
</html>
